import request from '@/utils/request'

// 查询课程章节列表
export function listCourseChapters(query) {
  return request({
    url: '/know/courseChapters/list',
    method: 'get',
    params: query
  })
}

// 查询课程章节列表
export function getAll() {
  return request({
    url: '/know/courseChapters/getAll',
    method: 'get',
  })
}

// 查询课程章节详细
export function getCourseChapters(chapterId) {
  return request({
    url: '/know/courseChapters/' + chapterId,
    method: 'get'
  })
}

// 新增课程章节
export function addCourseChapters(data) {
  return request({
    url: '/know/courseChapters',
    method: 'post',
    data: data
  })
}

// 修改课程章节
export function updateCourseChapters(data) {
  return request({
    url: '/know/courseChapters',
    method: 'put',
    data: data
  })
}

// 删除课程章节
export function delCourseChapters(chapterId) {
  return request({
    url: '/know/courseChapters/' + chapterId,
    method: 'delete'
  })
}
